#编写异步任务代码
from celery_tasks.sms.yuntongxun.sms import CCP
from celery_tasks.main import celery_app

@celery_app.task(name='send_sms_code')  #此装饰器是为了让下面的函数真正的成为celery的任务
def send_sms_code(mobile, sms_code):
    CCP().send_template_sms(mobile, [sms_code, 5], 1)